import request from "@/utils/request";

// 获取列表
export function getAllList(query) {
  return request({
    url: "/knowledgeManagement/getPage",
    method: "get",
    params: query,
  });
}

// 保存
export function saveData(data) {
  return request({
    url: "/knowledgeManagement/save",
    method: "post",
    data:data
  });
}

// 修改
export function updateData(data) {
  return request({
    url: "/knowledgeManagement/updateById",
    method: "post",
    data:data
  });
}

// 查看
export function getDetail(id) {
  return request({
    url: "/knowledgeManagement/findById",
    method: "get",
    params:id
  });
}

// 获取知识库编号
export function getCode(id) {
  return request({
    url: "knowledgeManagement/getCode",
    method: "get",
    params:id
  });
}
// 获取创建人信息
export function getCreateInfo() {
  return request({
    url: "/knowledgeManagement/getHeadInfo",
    method: "get",
  });
}

// 获取创建人信息
export function getKnowledgeCode(query) {
  return request({
    url: "/knowledgeManagement/getKnowledgeCode",
    method: "get",
    params:query
  });
}

//删除
export function del(id) {
  return request({
    url: "/knowledgeManagement/deleteById/"+id,
    method: "post",
  });
}